import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:leader_help/page/task/subs/question_detail/index.dart';
import 'package:leader_help/utils/util.dart';

class QuestionDetailSectionView extends GetView<QuestionDetailController> {
  const QuestionDetailSectionView({
    Key? key,
    this.index,
    required this.title,
    this.summary,
  }) : super(key: key);
  final String title;
  final String? summary;
  final int? index;
  @override
  Widget build(BuildContext context) {
    return Container(
      height: 35.r,
      child: Row(
        children: [
          Container(
            width: 2.r,
            height: 12.h,
            color: ColorsUtil.red,
          ),
          SizedBox(
            width: 10.r,
          ),
          Text(
            title,
            style: pfSCStyle(color: ColorsUtil.title, fontSize: 14.sp),
          ),
          summary == null
              ? const SizedBox()
              : Expanded(
                  child: Container(
                  child: Text(
                    summary!,
                    style: TextStyle(color: ColorsUtil.title, fontSize: 14.sp),
                  ),
                ))
        ],
      ),
    );
  }
}
